home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-28 | 917 b | 50 lines | [TEXT/CWIE] |
- // Pane.h
-
- #ifndef Pane_h
- #define Pane_h
-
- #ifndef Rectangle_h
- #include "Rectangle.h"
- #endif
-
- class View;
- class Sizeable;
- class RegionObject;
- class WindowObject;
-
- class Pane
- {
- private:
- WindowObject *window;
- Rectangle bounds;
- View *view;
-
- protected:
- void MapTo( WindowObject& );
- void Unmap();
-
- void SetBounds( Rectangle );
-
- public:
- Pane();
- ~Pane();
-
- View& operator*() const { Assert( view != 0 ); return *view; }
- View *operator->() const { Assert( view != 0 ); return view; }
-
- const Sizeable& Size() const;
-
- bool IsEmpty() const { return view == 0; }
-
- void SetView( View& );
- void ClearView();
-
- bool Mapped() const { return window != 0; }
- WindowObject& Window() const { Assert( window != 0 ); return *window; }
- const Rectangle& Bounds() const { Assert( window != 0 ); return bounds; }
-
- virtual void Clip( RegionObject& ) const = 0;
- };
-
- #endif
-